package com.example.myapplication.service;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.util.Log;

import androidx.annotation.Nullable;

//我的服务
public class MyService extends Service {

    @Override
    //创建服务
    public void onCreate() {
        Log.d("TAG", "onCreate: ...onCreate");
        super.onCreate();
    }

    @Override
    //开始服务
    public void onStart(Intent intent, int startId) {
        super.onStart(intent, startId);
        Log.d("TAG", "onStart: ...onStart");
    }

    @Override
    public int onStartCommand(Intent intent, int flags, int startId) {
        Log.d("TAG", "onStartCommand: ...onStartCommand");
        return super.onStartCommand(intent, flags, startId);
    }

    @Override
    public IBinder onBind(Intent intent) {
        Log.d("TAG", "onBind: ...onBind");
        return null;
    }

    @Override
    public boolean onUnbind(Intent intent) {
        Log.d("TAG", "onUnbind: ...onUnbind");
        return super.onUnbind(intent);
    }

    @Override
    public void onDestroy() {
        Log.d("TAG", "onDestroy: ...onDestroy");
        super.onDestroy();

    }


}
